{	Problem: http://codeforces.ru/problemset/problem/38/C
 	Verdict: Accepted
}
var i,n,l,m,r,c,j:longint; a:array[0..110] of longint;
begin
read(n,l);
m:=0;
for i:=1 to n do begin
  read(a[i]);
  if a[i]>a[m] then m:=i;
end;
r:=0;
for i:=l to a[m] do begin
  c:=0;
  for j:=1 to n do inc(c,a[j] div i);
  if c*i>r then r:=c*i;
end;
write(r);
end.